<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>hg.markdown.markdown</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>hg.markdown.markdown</h1>

<h3>Global Attributes</h3>
<table>
<tr><td>AUTOLINK_PATTERN</td></tr><tr><td>AUTOLINK_RE</td></tr><tr><td>AUTOMAIL_PATTERN</td></tr><tr><td>AUTOMAIL_RE</td></tr><tr><td>BACKTICK_PATTERN</td></tr><tr><td>BACKTICK_RE</td></tr><tr><td>BLOCK_LEVEL_ELEMENTS</td></tr><tr><td>BOMS</td></tr><tr><td>BRK</td></tr><tr><td>BasePattern</td></tr><tr><td>DOUBLE_BACKTICK_PATTERN</td></tr><tr><td>DOUBLE_BACKTICK_RE</td></tr><tr><td>EMPHASIS_PATTERN</td></tr><tr><td>EMPHASIS_PATTERN_2</td></tr><tr><td>EMPHASIS_RE</td></tr><tr><td>ENABLE_ATTRIBUTES</td></tr><tr><td>ENTITY_NORMALIZATION_EXPRESSIONS</td></tr><tr><td>ENTITY_NORMALIZATION_EXPRESSIONS_SOFT</td></tr><tr><td>ENTITY_PATTERN</td></tr><tr><td>ENTITY_RE</td></tr><tr><td>ESCAPE_PATTERN</td></tr><tr><td>ESCAPE_RE</td></tr><tr><td>EXECUTABLE_NAME_FOR_USAGE</td></tr><tr><td>HEADER_PREPROCESSOR</td></tr><tr><td>HTML_BLOCK_PREPROCESSOR</td></tr><tr><td>HTML_PATTERN</td></tr><tr><td>HTML_PLACEHOLDER</td></tr><tr><td>HTML_PLACEHOLDER_PREFIX</td></tr><tr><td>HTML_RE</td></tr><tr><td>HTML_REMOVED_TEXT</td></tr><tr><td>IMAGE_LINK_PATTERN</td></tr><tr><td>IMAGE_LINK_RE</td></tr><tr><td>IMAGE_REFERENCE_PATTERN</td></tr><tr><td>IMAGE_REFERENCE_RE</td></tr><tr><td>LINE_BREAK_2_RE</td></tr><tr><td>LINE_BREAK_PATTERN</td></tr><tr><td>LINE_BREAK_PATTERN_2</td></tr><tr><td>LINE_BREAK_RE</td></tr><tr><td>LINE_PREPROCESSOR</td></tr><tr><td>LINK_ANGLED_PATTERN</td></tr><tr><td>LINK_ANGLED_RE</td></tr><tr><td>LINK_PATTERN</td></tr><tr><td>LINK_RE</td></tr><tr><td>MESSAGE_THRESHOLD</td></tr><tr><td>NOBRACKET</td></tr><tr><td>NOIMG</td></tr><tr><td>NOT_STRONG_PATTERN</td></tr><tr><td>NOT_STRONG_RE</td></tr><tr><td>OPTPARSE_WARNING</td></tr><tr><td>RAWHTMLTEXTPOSTPROCESSOR</td></tr><tr><td>RE</td></tr><tr><td>REFERENCE_PATTERN</td></tr><tr><td>REFERENCE_PREPROCESSOR</td></tr><tr><td>REFERENCE_RE</td></tr><tr><td>RTL_BIDI_RANGES</td></tr><tr><td>SMART_EMPHASIS</td></tr><tr><td>STRONG_2_RE</td></tr><tr><td>STRONG_EM_2_RE</td></tr><tr><td>STRONG_EM_PATTERN</td></tr><tr><td>STRONG_EM_PATTERN_2</td></tr><tr><td>STRONG_EM_RE</td></tr><tr><td>STRONG_PATTERN</td></tr><tr><td>STRONG_PATTERN_2</td></tr><tr><td>STRONG_RE</td></tr><tr><td>TAB_LENGTH</td></tr><tr><td>__revision__</td></tr><tr><td>console_hndlr</td></tr><tr><td>formatter</td></tr><tr><td>logger</td></tr><tr><td>version</td></tr><tr><td>version_info</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#AutolinkPattern">AutolinkPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#AutomailPattern">AutomailPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#BacktickPattern">BacktickPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#BlockGuru">BlockGuru</a></td>
<td></td>
</tr><tr>
<td><a href="#CDATA">CDATA</a></td>
<td></td>
</tr><tr>
<td><a href="#CorePatterns">CorePatterns</a></td>
<td>This class is scheduled for removal as part of a refactoring effort.</td>
</tr><tr>
<td><a href="#Document">Document</a></td>
<td></td>
</tr><tr>
<td><a href="#DoubleTagPattern">DoubleTagPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#Element">Element</a></td>
<td></td>
</tr><tr>
<td><a href="#EntityReference">EntityReference</a></td>
<td></td>
</tr><tr>
<td><a href="#Extension">Extension</a></td>
<td></td>
</tr><tr>
<td><a href="#HeaderPreprocessor">HeaderPreprocessor</a></td>
<td>Replaces underlined headers with hashed headers to avoid the nead for lookahead later.</td>
</tr><tr>
<td><a href="#HtmlBlockPreprocessor">HtmlBlockPreprocessor</a></td>
<td>Removes html blocks from the source text and stores it.</td>
</tr><tr>
<td><a href="#HtmlPattern">HtmlPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlStash">HtmlStash</a></td>
<td>This class is used for stashing HTML objects that we extract in the beginning and replace with place-holders.</td>
</tr><tr>
<td><a href="#ImagePattern">ImagePattern</a></td>
<td></td>
</tr><tr>
<td><a href="#ImageReferencePattern">ImageReferencePattern</a></td>
<td></td>
</tr><tr>
<td><a href="#LinePreprocessor">LinePreprocessor</a></td>
<td>Deals with HR lines (needs to be done before processing lists)</td>
</tr><tr>
<td><a href="#LinkPattern">LinkPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown">Markdown</a></td>
<td>Markdown formatter class for creating an html document from Markdown text</td>
</tr><tr>
<td><a href="#Pattern">Pattern</a></td>
<td></td>
</tr><tr>
<td><a href="#Postprocessor">Postprocessor</a></td>
<td>Postprocessors are run before the dom it converted back into text.</td>
</tr><tr>
<td><a href="#Preprocessor">Preprocessor</a></td>
<td>Preprocessors are run after the text is broken into lines.</td>
</tr><tr>
<td><a href="#RawHtmlTextPostprocessor">RawHtmlTextPostprocessor</a></td>
<td></td>
</tr><tr>
<td><a href="#ReferencePattern">ReferencePattern</a></td>
<td></td>
</tr><tr>
<td><a href="#ReferencePreprocessor">ReferencePreprocessor</a></td>
<td>Removes reference definitions from the text and stores them for later use.</td>
</tr><tr>
<td><a href="#SimpleTagPattern">SimpleTagPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#SimpleTextPattern">SimpleTextPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#SubstituteTagPattern">SubstituteTagPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#TextNode">TextNode</a></td>
<td></td>
</tr><tr>
<td><a href="#TextPostprocessor">TextPostprocessor</a></td>
<td>TextPostprocessors are run after the dom it converted back into text.</td>
</tr><tr>
<td><a href="#TextPreprocessor">TextPreprocessor</a></td>
<td>TextPreprocessors are run before the text is broken into lines.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr>
<td><a href="#dequote">dequote</a></td>
<td>Removes quotes from around a string</td>
</tr><tr>
<td><a href="#getBidiType">getBidiType</a></td>
<td></td>
</tr><tr>
<td><a href="#isBlockLevel">isBlockLevel</a></td>
<td></td>
</tr><tr>
<td><a href="#markdown">markdown</a></td>
<td></td>
</tr><tr>
<td><a href="#markdownFromFile">markdownFromFile</a></td>
<td></td>
</tr><tr>
<td><a href="#message">message</a></td>
<td>A wrapper method for logging debug messages.</td>
</tr><tr>
<td><a href="#parse_options">parse_options</a></td>
<td>Run Markdown from the command line.</td>
</tr><tr>
<td><a href="#print_error">print_error</a></td>
<td>Print an error string to stderr</td>
</tr><tr>
<td><a href="#removeBOM">removeBOM</a></td>
<td></td>
</tr>
</table>
<hr /><hr />
<a NAME="AutolinkPattern" ID="AutolinkPattern"></a>
<h2>AutolinkPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#AutolinkPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="AutolinkPattern.handleMatch" ID="AutolinkPattern.handleMatch"></a>
<h4>AutolinkPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="AutomailPattern" ID="AutomailPattern"></a>
<h2>AutomailPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#AutomailPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="AutomailPattern.handleMatch" ID="AutomailPattern.handleMatch"></a>
<h4>AutomailPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="BacktickPattern" ID="BacktickPattern"></a>
<h2>BacktickPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#BacktickPattern.__init__">BacktickPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#BacktickPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="BacktickPattern.__init__" ID="BacktickPattern.__init__"></a>
<h4>BacktickPattern (Constructor)</h4>
<b>BacktickPattern</b>(<i>pattern</i>)
<a NAME="BacktickPattern.handleMatch" ID="BacktickPattern.handleMatch"></a>
<h4>BacktickPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="BlockGuru" ID="BlockGuru"></a>
<h2>BlockGuru</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#BlockGuru._findHead">_findHead</a></td>
<td>Functional magic to help determine boundaries of indented blocks.</td>
</tr><tr>
<td><a href="#BlockGuru.detabbed_fn">detabbed_fn</a></td>
<td>An auxiliary method to be passed to _findHead</td>
</tr><tr>
<td><a href="#BlockGuru.detectTabbed">detectTabbed</a></td>
<td></td>
</tr>
</table>
<a NAME="BlockGuru._findHead" ID="BlockGuru._findHead"></a>
<h4>BlockGuru._findHead</h4>
<b>_findHead</b>(<i>lines, fn, allowBlank=0</i>)
<p>
Functional magic to help determine boundaries of indented
           blocks.
</p><dl>
<dt><i>lines:</i></dt>
<dd>
an array of strings
</dd><dt><i>fn:</i></dt>
<dd>
a function that returns a substring of a string
                      if the string matches the necessary criteria
</dd><dt><i>allowBlank:</i></dt>
<dd>
specifies whether it's ok to have blank
                      lines between matching functions
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
a list of post processes items and the unused
                      remainder of the original list
</dd>
</dl><a NAME="BlockGuru.detabbed_fn" ID="BlockGuru.detabbed_fn"></a>
<h4>BlockGuru.detabbed_fn</h4>
<b>detabbed_fn</b>(<i>line</i>)
<p>
 An auxiliary method to be passed to _findHead 
</p><a NAME="BlockGuru.detectTabbed" ID="BlockGuru.detectTabbed"></a>
<h4>BlockGuru.detectTabbed</h4>
<b>detectTabbed</b>(<i>lines</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="CDATA" ID="CDATA"></a>
<h2>CDATA</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>type</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#CDATA.__init__">CDATA</a></td>
<td></td>
</tr><tr>
<td><a href="#CDATA.handleAttributes">handleAttributes</a></td>
<td></td>
</tr><tr>
<td><a href="#CDATA.toxml">toxml</a></td>
<td></td>
</tr>
</table>
<a NAME="CDATA.__init__" ID="CDATA.__init__"></a>
<h4>CDATA (Constructor)</h4>
<b>CDATA</b>(<i>text</i>)
<a NAME="CDATA.handleAttributes" ID="CDATA.handleAttributes"></a>
<h4>CDATA.handleAttributes</h4>
<b>handleAttributes</b>(<i></i>)
<a NAME="CDATA.toxml" ID="CDATA.toxml"></a>
<h4>CDATA.toxml</h4>
<b>toxml</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="CorePatterns" ID="CorePatterns"></a>
<h2>CorePatterns</h2>
<p>
This class is scheduled for removal as part of a refactoring
        effort.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>patterns</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#CorePatterns.__init__">CorePatterns</a></td>
<td></td>
</tr>
</table>
<a NAME="CorePatterns.__init__" ID="CorePatterns.__init__"></a>
<h4>CorePatterns (Constructor)</h4>
<b>CorePatterns</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Document" ID="Document"></a>
<h2>Document</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Document.__init__">Document</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.appendChild">appendChild</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.createCDATA">createCDATA</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.createElement">createElement</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.createEntityReference">createEntityReference</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.createTextNode">createTextNode</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.find">find</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.normalizeEntities">normalizeEntities</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.setBidi">setBidi</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.toxml">toxml</a></td>
<td></td>
</tr><tr>
<td><a href="#Document.unlink">unlink</a></td>
<td></td>
</tr>
</table>
<a NAME="Document.__init__" ID="Document.__init__"></a>
<h4>Document (Constructor)</h4>
<b>Document</b>(<i></i>)
<a NAME="Document.appendChild" ID="Document.appendChild"></a>
<h4>Document.appendChild</h4>
<b>appendChild</b>(<i>child</i>)
<a NAME="Document.createCDATA" ID="Document.createCDATA"></a>
<h4>Document.createCDATA</h4>
<b>createCDATA</b>(<i>text</i>)
<a NAME="Document.createElement" ID="Document.createElement"></a>
<h4>Document.createElement</h4>
<b>createElement</b>(<i>tag, textNode=None</i>)
<a NAME="Document.createEntityReference" ID="Document.createEntityReference"></a>
<h4>Document.createEntityReference</h4>
<b>createEntityReference</b>(<i>entity</i>)
<a NAME="Document.createTextNode" ID="Document.createTextNode"></a>
<h4>Document.createTextNode</h4>
<b>createTextNode</b>(<i>text</i>)
<a NAME="Document.find" ID="Document.find"></a>
<h4>Document.find</h4>
<b>find</b>(<i>test</i>)
<a NAME="Document.normalizeEntities" ID="Document.normalizeEntities"></a>
<h4>Document.normalizeEntities</h4>
<b>normalizeEntities</b>(<i>text, avoidDoubleNormalizing=False</i>)
<a NAME="Document.setBidi" ID="Document.setBidi"></a>
<h4>Document.setBidi</h4>
<b>setBidi</b>(<i>bidi</i>)
<a NAME="Document.toxml" ID="Document.toxml"></a>
<h4>Document.toxml</h4>
<b>toxml</b>(<i></i>)
<a NAME="Document.unlink" ID="Document.unlink"></a>
<h4>Document.unlink</h4>
<b>unlink</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="DoubleTagPattern" ID="DoubleTagPattern"></a>
<h2>DoubleTagPattern</h2>

<h3>Derived from</h3>
SimpleTagPattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#DoubleTagPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="DoubleTagPattern.handleMatch" ID="DoubleTagPattern.handleMatch"></a>
<h4>DoubleTagPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Element" ID="Element"></a>
<h2>Element</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>type</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Element.__init__">Element</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.appendChild">appendChild</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.find">find</a></td>
<td>Returns a list of descendants that pass the test function</td>
</tr><tr>
<td><a href="#Element.handleAttributes">handleAttributes</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.insertChild">insertChild</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.removeChild">removeChild</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.replaceChild">replaceChild</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.setAttribute">setAttribute</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.setBidi">setBidi</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.toxml">toxml</a></td>
<td></td>
</tr><tr>
<td><a href="#Element.unlink">unlink</a></td>
<td></td>
</tr>
</table>
<a NAME="Element.__init__" ID="Element.__init__"></a>
<h4>Element (Constructor)</h4>
<b>Element</b>(<i>tag</i>)
<a NAME="Element.appendChild" ID="Element.appendChild"></a>
<h4>Element.appendChild</h4>
<b>appendChild</b>(<i>child</i>)
<a NAME="Element.find" ID="Element.find"></a>
<h4>Element.find</h4>
<b>find</b>(<i>test, depth=0</i>)
<p>
 Returns a list of descendants that pass the test function 
</p><a NAME="Element.handleAttributes" ID="Element.handleAttributes"></a>
<h4>Element.handleAttributes</h4>
<b>handleAttributes</b>(<i></i>)
<a NAME="Element.insertChild" ID="Element.insertChild"></a>
<h4>Element.insertChild</h4>
<b>insertChild</b>(<i>position, child</i>)
<a NAME="Element.removeChild" ID="Element.removeChild"></a>
<h4>Element.removeChild</h4>
<b>removeChild</b>(<i>child</i>)
<a NAME="Element.replaceChild" ID="Element.replaceChild"></a>
<h4>Element.replaceChild</h4>
<b>replaceChild</b>(<i>oldChild, newChild</i>)
<a NAME="Element.setAttribute" ID="Element.setAttribute"></a>
<h4>Element.setAttribute</h4>
<b>setAttribute</b>(<i>attr, value</i>)
<a NAME="Element.setBidi" ID="Element.setBidi"></a>
<h4>Element.setBidi</h4>
<b>setBidi</b>(<i>bidi</i>)
<a NAME="Element.toxml" ID="Element.toxml"></a>
<h4>Element.toxml</h4>
<b>toxml</b>(<i></i>)
<a NAME="Element.unlink" ID="Element.unlink"></a>
<h4>Element.unlink</h4>
<b>unlink</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="EntityReference" ID="EntityReference"></a>
<h2>EntityReference</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>type</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#EntityReference.__init__">EntityReference</a></td>
<td></td>
</tr><tr>
<td><a href="#EntityReference.handleAttributes">handleAttributes</a></td>
<td></td>
</tr><tr>
<td><a href="#EntityReference.toxml">toxml</a></td>
<td></td>
</tr>
</table>
<a NAME="EntityReference.__init__" ID="EntityReference.__init__"></a>
<h4>EntityReference (Constructor)</h4>
<b>EntityReference</b>(<i>entity</i>)
<a NAME="EntityReference.handleAttributes" ID="EntityReference.handleAttributes"></a>
<h4>EntityReference.handleAttributes</h4>
<b>handleAttributes</b>(<i></i>)
<a NAME="EntityReference.toxml" ID="EntityReference.toxml"></a>
<h4>EntityReference.toxml</h4>
<b>toxml</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Extension" ID="Extension"></a>
<h2>Extension</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Extension.__init__">Extension</a></td>
<td></td>
</tr><tr>
<td><a href="#Extension.getConfig">getConfig</a></td>
<td></td>
</tr><tr>
<td><a href="#Extension.getConfigInfo">getConfigInfo</a></td>
<td></td>
</tr><tr>
<td><a href="#Extension.setConfig">setConfig</a></td>
<td></td>
</tr>
</table>
<a NAME="Extension.__init__" ID="Extension.__init__"></a>
<h4>Extension (Constructor)</h4>
<b>Extension</b>(<i>configs = {}</i>)
<a NAME="Extension.getConfig" ID="Extension.getConfig"></a>
<h4>Extension.getConfig</h4>
<b>getConfig</b>(<i>key</i>)
<a NAME="Extension.getConfigInfo" ID="Extension.getConfigInfo"></a>
<h4>Extension.getConfigInfo</h4>
<b>getConfigInfo</b>(<i></i>)
<a NAME="Extension.setConfig" ID="Extension.setConfig"></a>
<h4>Extension.setConfig</h4>
<b>setConfig</b>(<i>key, value</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="HeaderPreprocessor" ID="HeaderPreprocessor"></a>
<h2>HeaderPreprocessor</h2>
<p>
       Replaces underlined headers with hashed headers to avoid
       the nead for lookahead later.
</p>
<h3>Derived from</h3>
Preprocessor
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HeaderPreprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="HeaderPreprocessor.run" ID="HeaderPreprocessor.run"></a>
<h4>HeaderPreprocessor.run</h4>
<b>run</b>(<i>lines</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="HtmlBlockPreprocessor" ID="HtmlBlockPreprocessor"></a>
<h2>HtmlBlockPreprocessor</h2>
<p>
Removes html blocks from the source text and stores it.
</p>
<h3>Derived from</h3>
TextPreprocessor
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HtmlBlockPreprocessor._equal_tags">_equal_tags</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlBlockPreprocessor._get_left_tag">_get_left_tag</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlBlockPreprocessor._get_right_tag">_get_right_tag</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlBlockPreprocessor._is_oneliner">_is_oneliner</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlBlockPreprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="HtmlBlockPreprocessor._equal_tags" ID="HtmlBlockPreprocessor._equal_tags"></a>
<h4>HtmlBlockPreprocessor._equal_tags</h4>
<b>_equal_tags</b>(<i>left_tag, right_tag</i>)
<a NAME="HtmlBlockPreprocessor._get_left_tag" ID="HtmlBlockPreprocessor._get_left_tag"></a>
<h4>HtmlBlockPreprocessor._get_left_tag</h4>
<b>_get_left_tag</b>(<i>block</i>)
<a NAME="HtmlBlockPreprocessor._get_right_tag" ID="HtmlBlockPreprocessor._get_right_tag"></a>
<h4>HtmlBlockPreprocessor._get_right_tag</h4>
<b>_get_right_tag</b>(<i>left_tag, block</i>)
<a NAME="HtmlBlockPreprocessor._is_oneliner" ID="HtmlBlockPreprocessor._is_oneliner"></a>
<h4>HtmlBlockPreprocessor._is_oneliner</h4>
<b>_is_oneliner</b>(<i>tag</i>)
<a NAME="HtmlBlockPreprocessor.run" ID="HtmlBlockPreprocessor.run"></a>
<h4>HtmlBlockPreprocessor.run</h4>
<b>run</b>(<i>text</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="HtmlPattern" ID="HtmlPattern"></a>
<h2>HtmlPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HtmlPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="HtmlPattern.handleMatch" ID="HtmlPattern.handleMatch"></a>
<h4>HtmlPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="HtmlStash" ID="HtmlStash"></a>
<h2>HtmlStash</h2>
<p>
This class is used for stashing HTML objects that we extract
        in the beginning and replace with place-holders.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HtmlStash.__init__">HtmlStash</a></td>
<td></td>
</tr><tr>
<td><a href="#HtmlStash.store">store</a></td>
<td>Saves an HTML segment for later reinsertion.</td>
</tr>
</table>
<a NAME="HtmlStash.__init__" ID="HtmlStash.__init__"></a>
<h4>HtmlStash (Constructor)</h4>
<b>HtmlStash</b>(<i></i>)
<a NAME="HtmlStash.store" ID="HtmlStash.store"></a>
<h4>HtmlStash.store</h4>
<b>store</b>(<i>html, safe=False</i>)
<p>
Saves an HTML segment for later reinsertion.  Returns a
           placeholder string that needs to be inserted into the
           document.
</p><dl>
<dt><i>html:</i></dt>
<dd>
an html segment
</dd><dt><i>safe:</i></dt>
<dd>
label an html segment as safe for safemode
</dd><dt><i>inline:</i></dt>
<dd>
label a segmant as inline html
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
: a placeholder string
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ImagePattern" ID="ImagePattern"></a>
<h2>ImagePattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ImagePattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="ImagePattern.handleMatch" ID="ImagePattern.handleMatch"></a>
<h4>ImagePattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ImageReferencePattern" ID="ImageReferencePattern"></a>
<h2>ImageReferencePattern</h2>

<h3>Derived from</h3>
ReferencePattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ImageReferencePattern.makeTag">makeTag</a></td>
<td></td>
</tr>
</table>
<a NAME="ImageReferencePattern.makeTag" ID="ImageReferencePattern.makeTag"></a>
<h4>ImageReferencePattern.makeTag</h4>
<b>makeTag</b>(<i>href, title, text, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="LinePreprocessor" ID="LinePreprocessor"></a>
<h2>LinePreprocessor</h2>
<p>
Deals with HR lines (needs to be done before processing lists)
</p>
<h3>Derived from</h3>
Preprocessor
<h3>Class Attributes</h3>
<table>
<tr><td>blockquote_re</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#LinePreprocessor._isLine">_isLine</a></td>
<td>Determines if a block should be replaced with an <HR></td>
</tr><tr>
<td><a href="#LinePreprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="LinePreprocessor._isLine" ID="LinePreprocessor._isLine"></a>
<h4>LinePreprocessor._isLine</h4>
<b>_isLine</b>(<i>block</i>)
<p>
Determines if a block should be replaced with an <HR>
</p><a NAME="LinePreprocessor.run" ID="LinePreprocessor.run"></a>
<h4>LinePreprocessor.run</h4>
<b>run</b>(<i>lines</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="LinkPattern" ID="LinkPattern"></a>
<h2>LinkPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#LinkPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="LinkPattern.handleMatch" ID="LinkPattern.handleMatch"></a>
<h4>LinkPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Markdown" ID="Markdown"></a>
<h2>Markdown</h2>
<p>
 Markdown formatter class for creating an html document from
        Markdown text 
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>__unicode__</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Markdown.__init__">Markdown</a></td>
<td>Creates a new Markdown instance.</td>
</tr><tr>
<td><a href="#Markdown.__str__">__str__</a></td>
<td>Report info about instance.</td>
</tr><tr>
<td><a href="#Markdown._applyPattern">_applyPattern</a></td>
<td>Given a pattern name, this function checks if the line fits the pattern, creates the necessary elements, and returns back a list consisting of NanoDom elements and/or strings.</td>
</tr><tr>
<td><a href="#Markdown._handleInline">_handleInline</a></td>
<td>Transform a Markdown line with inline elements to an XHTML fragment.</td>
</tr><tr>
<td><a href="#Markdown._linesUntil">_linesUntil</a></td>
<td>A utility function to break a list of lines upon the first line that satisfied a condition.</td>
</tr><tr>
<td><a href="#Markdown._processCodeBlock">_processCodeBlock</a></td>
<td>Given a list of document lines starting with a code block finds the end of the block, puts it into the dom verbatim wrapped in ("<pre><code>") and recursively processes the the remainder of the text file.</td>
</tr><tr>
<td><a href="#Markdown._processHeader">_processHeader</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown._processList">_processList</a></td>
<td>Given a list of document lines starting with a list item, finds the end of the list, breaks it up, and recursively processes each list item and the remainder of the text file.</td>
</tr><tr>
<td><a href="#Markdown._processOList">_processOList</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown._processParagraph">_processParagraph</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown._processQuote">_processQuote</a></td>
<td>Given a list of document lines starting with a quote finds the end of the quote, unindents it and recursively processes the body of the quote and the remainder of the text file.</td>
</tr><tr>
<td><a href="#Markdown._processSection">_processSection</a></td>
<td>Process a section of a source document, looking for high level structural elements like lists, block quotes, code segments, html blocks, etc.</td>
</tr><tr>
<td><a href="#Markdown._processUList">_processUList</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown._transform">_transform</a></td>
<td>Transforms the Markdown text into a XHTML body document</td>
</tr><tr>
<td><a href="#Markdown.convert">convert</a></td>
<td>Return the document in XHTML format.</td>
</tr><tr>
<td><a href="#Markdown.registerExtension">registerExtension</a></td>
<td>This gets called by the extension</td>
</tr><tr>
<td><a href="#Markdown.registerExtensions">registerExtensions</a></td>
<td></td>
</tr><tr>
<td><a href="#Markdown.reset">reset</a></td>
<td>Resets all state variables so that we can start with a new text.</td>
</tr>
</table>
<a NAME="Markdown.__init__" ID="Markdown.__init__"></a>
<h4>Markdown (Constructor)</h4>
<b>Markdown</b>(<i>source=None, extensions=[], extension_configs=None, safe_mode = False</i>)
<p>
Creates a new Markdown instance.
</p><dl>
<dt><i>source:</i></dt>
<dd>
The text in Markdown format. Depreciated!
</dd><dt><i>extensions:</i></dt>
<dd>
A list if extensions.
</dd><dt><i>extension-configs:</i></dt>
<dd>
Configuration setting for extensions.
</dd><dt><i>safe_mode:</i></dt>
<dd>
Disallow raw html.
</dd>
</dl><a NAME="Markdown.__str__" ID="Markdown.__str__"></a>
<h4>Markdown.__str__</h4>
<b>__str__</b>(<i></i>)
<p>
 Report info about instance. Markdown always returns unicode. 
</p><a NAME="Markdown._applyPattern" ID="Markdown._applyPattern"></a>
<h4>Markdown._applyPattern</h4>
<b>_applyPattern</b>(<i>line, pattern, patternIndex</i>)
<p>
 Given a pattern name, this function checks if the line
        fits the pattern, creates the necessary elements, and returns
        back a list consisting of NanoDom elements and/or strings.
</p><dl>
<dt><i>line:</i></dt>
<dd>
the text to be processed
</dd><dt><i>pattern:</i></dt>
<dd>
the pattern to be checked
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
the appropriate newly created NanoDom element if the
                  pattern matches, None otherwise.
</dd>
</dl><a NAME="Markdown._handleInline" ID="Markdown._handleInline"></a>
<h4>Markdown._handleInline</h4>
<b>_handleInline</b>(<i>line, patternIndex=0</i>)
<p>
Transform a Markdown line with inline elements to an XHTML
        fragment.
</p><p>
        This function uses auxiliary objects called inline patterns.
        See notes on inline patterns above.
</p><dl>
<dt><i>line:</i></dt>
<dd>
A line of Markdown text
</dd><dt><i>patternIndex:</i></dt>
<dd>
The index of the inlinePattern to start with
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
A list of NanoDom nodes
</dd>
</dl><a NAME="Markdown._linesUntil" ID="Markdown._linesUntil"></a>
<h4>Markdown._linesUntil</h4>
<b>_linesUntil</b>(<i>lines, condition</i>)
<p>
 A utility function to break a list of lines upon the
            first line that satisfied a condition.  The condition
            argument should be a predicate function.
</p><a NAME="Markdown._processCodeBlock" ID="Markdown._processCodeBlock"></a>
<h4>Markdown._processCodeBlock</h4>
<b>_processCodeBlock</b>(<i>parent_elem, lines, inList</i>)
<p>
Given a list of document lines starting with a code block
           finds the end of the block, puts it into the dom verbatim
           wrapped in ("<pre><code>") and recursively processes the
           the remainder of the text file.
</p><dl>
<dt><i>parent_elem:</i></dt>
<dd>
DOM element to which the content will be added
</dd><dt><i>lines:</i></dt>
<dd>
a list of lines
</dd><dt><i>inList:</i></dt>
<dd>
a level
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="Markdown._processHeader" ID="Markdown._processHeader"></a>
<h4>Markdown._processHeader</h4>
<b>_processHeader</b>(<i>parent_elem, paragraph</i>)
<a NAME="Markdown._processList" ID="Markdown._processList"></a>
<h4>Markdown._processList</h4>
<b>_processList</b>(<i>parent_elem, lines, inList, listexpr, tag</i>)
<p>
Given a list of document lines starting with a list item,
           finds the end of the list, breaks it up, and recursively
           processes each list item and the remainder of the text file.
</p><dl>
<dt><i>parent_elem:</i></dt>
<dd>
A dom element to which the content will be added
</dd><dt><i>lines:</i></dt>
<dd>
a list of lines
</dd><dt><i>inList:</i></dt>
<dd>
a level
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="Markdown._processOList" ID="Markdown._processOList"></a>
<h4>Markdown._processOList</h4>
<b>_processOList</b>(<i>parent_elem, lines, inList</i>)
<a NAME="Markdown._processParagraph" ID="Markdown._processParagraph"></a>
<h4>Markdown._processParagraph</h4>
<b>_processParagraph</b>(<i>parent_elem, paragraph, inList, looseList</i>)
<a NAME="Markdown._processQuote" ID="Markdown._processQuote"></a>
<h4>Markdown._processQuote</h4>
<b>_processQuote</b>(<i>parent_elem, lines, inList</i>)
<p>
Given a list of document lines starting with a quote finds
           the end of the quote, unindents it and recursively
           processes the body of the quote and the remainder of the
           text file.
</p><dl>
<dt><i>parent_elem:</i></dt>
<dd>
DOM element to which the content will be added
</dd><dt><i>lines:</i></dt>
<dd>
a list of lines
</dd><dt><i>inList:</i></dt>
<dd>
a level
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="Markdown._processSection" ID="Markdown._processSection"></a>
<h4>Markdown._processSection</h4>
<b>_processSection</b>(<i>parent_elem, lines, inList = 0, looseList = 0</i>)
<p>
Process a section of a source document, looking for high
           level structural elements like lists, block quotes, code
           segments, html blocks, etc.  Some those then get stripped
           of their high level markup (e.g. get unindented) and the
           lower-level markup is processed recursively.
</p><dl>
<dt><i>parent_elem:</i></dt>
<dd>
A NanoDom element to which the content
                               will be added
</dd><dt><i>lines:</i></dt>
<dd>
a list of lines
</dd><dt><i>inList:</i></dt>
<dd>
a level
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="Markdown._processUList" ID="Markdown._processUList"></a>
<h4>Markdown._processUList</h4>
<b>_processUList</b>(<i>parent_elem, lines, inList</i>)
<a NAME="Markdown._transform" ID="Markdown._transform"></a>
<h4>Markdown._transform</h4>
<b>_transform</b>(<i></i>)
<p>
Transforms the Markdown text into a XHTML body document
</p><dl>
<dt>Returns:</dt>
<dd>
A NanoDom Document
</dd>
</dl><a NAME="Markdown.convert" ID="Markdown.convert"></a>
<h4>Markdown.convert</h4>
<b>convert</b>(<i>source = None</i>)
<p>
Return the document in XHTML format.
</p><dl>
<dt>Returns:</dt>
<dd>
A serialized XHTML body.
</dd>
</dl><a NAME="Markdown.registerExtension" ID="Markdown.registerExtension"></a>
<h4>Markdown.registerExtension</h4>
<b>registerExtension</b>(<i>extension</i>)
<p>
 This gets called by the extension 
</p><a NAME="Markdown.registerExtensions" ID="Markdown.registerExtensions"></a>
<h4>Markdown.registerExtensions</h4>
<b>registerExtensions</b>(<i>extensions, configs</i>)
<a NAME="Markdown.reset" ID="Markdown.reset"></a>
<h4>Markdown.reset</h4>
<b>reset</b>(<i></i>)
<p>
Resets all state variables so that we can start
            with a new text.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Pattern" ID="Pattern"></a>
<h2>Pattern</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Pattern.__init__">Pattern</a></td>
<td></td>
</tr><tr>
<td><a href="#Pattern.getCompiledRegExp">getCompiledRegExp</a></td>
<td></td>
</tr>
</table>
<a NAME="Pattern.__init__" ID="Pattern.__init__"></a>
<h4>Pattern (Constructor)</h4>
<b>Pattern</b>(<i>pattern</i>)
<a NAME="Pattern.getCompiledRegExp" ID="Pattern.getCompiledRegExp"></a>
<h4>Pattern.getCompiledRegExp</h4>
<b>getCompiledRegExp</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Postprocessor" ID="Postprocessor"></a>
<h2>Postprocessor</h2>
<p>
    Postprocessors are run before the dom it converted back into text.
</p><p>
    Each Postprocessor implements a "run" method that takes a pointer to a
    NanoDom document, modifies it as necessary and returns a NanoDom 
    document.
</p><p>
    Postprocessors must extend markdown.Postprocessor.
</p><p>
    There are currently no standard post-processors, but the footnote
    extension uses one.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Postprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="Postprocessor.run" ID="Postprocessor.run"></a>
<h4>Postprocessor.run</h4>
<b>run</b>(<i>dom</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="Preprocessor" ID="Preprocessor"></a>
<h2>Preprocessor</h2>
<p>
    Preprocessors are run after the text is broken into lines.
</p><p>
    Each preprocessor implements a "run" method that takes a pointer to a
    list of lines of the document, modifies it as necessary and returns
    either the same pointer or a pointer to a new list.  
</p><p>
    Preprocessors must extend markdown.Preprocessor.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Preprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="Preprocessor.run" ID="Preprocessor.run"></a>
<h4>Preprocessor.run</h4>
<b>run</b>(<i>lines</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="RawHtmlTextPostprocessor" ID="RawHtmlTextPostprocessor"></a>
<h2>RawHtmlTextPostprocessor</h2>

<h3>Derived from</h3>
TextPostprocessor
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#RawHtmlTextPostprocessor.__init__">RawHtmlTextPostprocessor</a></td>
<td></td>
</tr><tr>
<td><a href="#RawHtmlTextPostprocessor.escape">escape</a></td>
<td>Basic html escaping</td>
</tr><tr>
<td><a href="#RawHtmlTextPostprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="RawHtmlTextPostprocessor.__init__" ID="RawHtmlTextPostprocessor.__init__"></a>
<h4>RawHtmlTextPostprocessor (Constructor)</h4>
<b>RawHtmlTextPostprocessor</b>(<i></i>)
<a NAME="RawHtmlTextPostprocessor.escape" ID="RawHtmlTextPostprocessor.escape"></a>
<h4>RawHtmlTextPostprocessor.escape</h4>
<b>escape</b>(<i>html</i>)
<p>
 Basic html escaping 
</p><a NAME="RawHtmlTextPostprocessor.run" ID="RawHtmlTextPostprocessor.run"></a>
<h4>RawHtmlTextPostprocessor.run</h4>
<b>run</b>(<i>text</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ReferencePattern" ID="ReferencePattern"></a>
<h2>ReferencePattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ReferencePattern.handleMatch">handleMatch</a></td>
<td></td>
</tr><tr>
<td><a href="#ReferencePattern.makeTag">makeTag</a></td>
<td></td>
</tr>
</table>
<a NAME="ReferencePattern.handleMatch" ID="ReferencePattern.handleMatch"></a>
<h4>ReferencePattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)
<a NAME="ReferencePattern.makeTag" ID="ReferencePattern.makeTag"></a>
<h4>ReferencePattern.makeTag</h4>
<b>makeTag</b>(<i>href, title, text, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="ReferencePreprocessor" ID="ReferencePreprocessor"></a>
<h2>ReferencePreprocessor</h2>
<p>

</p><p>
    Removes reference definitions from the text and stores them for later use.
</p>
<h3>Derived from</h3>
Preprocessor
<h3>Class Attributes</h3>
<table>
<tr><td>EMPHASIS_2_RE</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ReferencePreprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="ReferencePreprocessor.run" ID="ReferencePreprocessor.run"></a>
<h4>ReferencePreprocessor.run</h4>
<b>run</b>(<i>lines</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="SimpleTagPattern" ID="SimpleTagPattern"></a>
<h2>SimpleTagPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#SimpleTagPattern.__init__">SimpleTagPattern</a></td>
<td></td>
</tr><tr>
<td><a href="#SimpleTagPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="SimpleTagPattern.__init__" ID="SimpleTagPattern.__init__"></a>
<h4>SimpleTagPattern (Constructor)</h4>
<b>SimpleTagPattern</b>(<i>pattern, tag</i>)
<a NAME="SimpleTagPattern.handleMatch" ID="SimpleTagPattern.handleMatch"></a>
<h4>SimpleTagPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="SimpleTextPattern" ID="SimpleTextPattern"></a>
<h2>SimpleTextPattern</h2>

<h3>Derived from</h3>
Pattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#SimpleTextPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="SimpleTextPattern.handleMatch" ID="SimpleTextPattern.handleMatch"></a>
<h4>SimpleTextPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="SubstituteTagPattern" ID="SubstituteTagPattern"></a>
<h2>SubstituteTagPattern</h2>

<h3>Derived from</h3>
SimpleTagPattern
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#SubstituteTagPattern.handleMatch">handleMatch</a></td>
<td></td>
</tr>
</table>
<a NAME="SubstituteTagPattern.handleMatch" ID="SubstituteTagPattern.handleMatch"></a>
<h4>SubstituteTagPattern.handleMatch</h4>
<b>handleMatch</b>(<i>m, doc</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="TextNode" ID="TextNode"></a>
<h2>TextNode</h2>

<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>attrRegExp</td></tr><tr><td>type</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#TextNode.__init__">TextNode</a></td>
<td></td>
</tr><tr>
<td><a href="#TextNode.attributeCallback">attributeCallback</a></td>
<td></td>
</tr><tr>
<td><a href="#TextNode.handleAttributes">handleAttributes</a></td>
<td></td>
</tr><tr>
<td><a href="#TextNode.toxml">toxml</a></td>
<td></td>
</tr>
</table>
<a NAME="TextNode.__init__" ID="TextNode.__init__"></a>
<h4>TextNode (Constructor)</h4>
<b>TextNode</b>(<i>text</i>)
<a NAME="TextNode.attributeCallback" ID="TextNode.attributeCallback"></a>
<h4>TextNode.attributeCallback</h4>
<b>attributeCallback</b>(<i>match</i>)
<a NAME="TextNode.handleAttributes" ID="TextNode.handleAttributes"></a>
<h4>TextNode.handleAttributes</h4>
<b>handleAttributes</b>(<i></i>)
<a NAME="TextNode.toxml" ID="TextNode.toxml"></a>
<h4>TextNode.toxml</h4>
<b>toxml</b>(<i></i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="TextPostprocessor" ID="TextPostprocessor"></a>
<h2>TextPostprocessor</h2>
<p>
    TextPostprocessors are run after the dom it converted back into text.
</p><p>
    Each TextPostprocessor implements a "run" method that takes a pointer to a
    text string, modifies it as necessary and returns a text string.
</p><p>
    TextPostprocessors must extend markdown.TextPostprocessor.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#TextPostprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="TextPostprocessor.run" ID="TextPostprocessor.run"></a>
<h4>TextPostprocessor.run</h4>
<b>run</b>(<i>text</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="TextPreprocessor" ID="TextPreprocessor"></a>
<h2>TextPreprocessor</h2>
<p>
    TextPreprocessors are run before the text is broken into lines.
</p><p>
    Each TextPreprocessor implements a "run" method that takes a pointer to a
    text string of the document, modifies it as necessary and returns
    either the same pointer or a pointer to a new string.  
</p><p>
    TextPreprocessors must extend markdown.TextPreprocessor.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#TextPreprocessor.run">run</a></td>
<td></td>
</tr>
</table>
<a NAME="TextPreprocessor.run" ID="TextPreprocessor.run"></a>
<h4>TextPreprocessor.run</h4>
<b>run</b>(<i>text</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="dequote" ID="dequote"></a>
<h2>dequote</h2>
<b>dequote</b>(<i>string</i>)
<p>
 Removes quotes from around a string 
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="getBidiType" ID="getBidiType"></a>
<h2>getBidiType</h2>
<b>getBidiType</b>(<i>text</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="isBlockLevel" ID="isBlockLevel"></a>
<h2>isBlockLevel</h2>
<b>isBlockLevel</b>(<i>tag</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="markdown" ID="markdown"></a>
<h2>markdown</h2>
<b>markdown</b>(<i>text, extensions = [], safe_mode = False</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="markdownFromFile" ID="markdownFromFile"></a>
<h2>markdownFromFile</h2>
<b>markdownFromFile</b>(<i>input = None, output = None, extensions = [], encoding = None, message_threshold = CRITICAL, safe = False</i>)

<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="message" ID="message"></a>
<h2>message</h2>
<b>message</b>(<i>level, text</i>)
<p>
 A wrapper method for logging debug messages. 
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="parse_options" ID="parse_options"></a>
<h2>parse_options</h2>
<b>parse_options</b>(<i></i>)
<p>
 Run Markdown from the command line. 
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="print_error" ID="print_error"></a>
<h2>print_error</h2>
<b>print_error</b>(<i>string</i>)
<p>
Print an error string to stderr
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="removeBOM" ID="removeBOM"></a>
<h2>removeBOM</h2>
<b>removeBOM</b>(<i>text, encoding</i>)

<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>